/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.teaching.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 题库（专题）管理Entity
 * @author 王卫党
 * @version 2018-01-24
 */
public class Library extends DataEntity<Library> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 专题名称
	private String type;		// type
	private Integer courseId;		// 课程编号，对应bay_course.id
	private String sortNo;		// sort_no
	private String trialNum;		// 试用数量
	private String questionNum;		// question_num
	private String enable;		// enable
	
	public Library() {
		super();
	}

	public Library(String id){
		super(id);
	}

	@Length(min=1, max=30, message="专题名称长度必须介于 1 和 30 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=20, message="type长度必须介于 0 和 20 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@NotNull(message="id不能为空")
	public Integer getCourseId() {
		return courseId;
	}

	public void setCourseId(Integer courseId) {
		this.courseId = courseId;
	}
	
	@Length(min=0, max=4, message="sort_no长度必须介于 0 和 4 之间")
	public String getSortNo() {
		return sortNo;
	}

	public void setSortNo(String sortNo) {
		this.sortNo = sortNo;
	}
	
	@Length(min=0, max=4, message="试用数量长度必须介于 0 和 4 之间")
	public String getTrialNum() {
		return trialNum;
	}

	public void setTrialNum(String trialNum) {
		this.trialNum = trialNum;
	}
	
	@Length(min=0, max=4, message="question_num长度必须介于 0 和 4 之间")
	public String getQuestionNum() {
		return questionNum;
	}

	public void setQuestionNum(String questionNum) {
		this.questionNum = questionNum;
	}
	
	@Length(min=1, max=1, message="enable长度必须介于 1 和 1 之间")
	public String getEnable() {
		return enable;
	}

	public void setEnable(String enable) {
		this.enable = enable;
	}
	
}